home *** CD-ROM | disk | FTP | other *** search
Wrap
/* v1.00 Rotate Marko Seppänen marko.seppanen@wwnet.fi */ address IMAGEENGINEER Options results signal on error /* Setup a place for errors to go */ if arg()=0 then exit x=arg(1) parse var x pic rot . if rot="" then do if exists("ie:prefs/verotate.cfg") == "1" then do call open("temp","ie:prefs/verotate.cfg","R") values=readln("temp") parse var values ok rot . call close("temp") end else do rot=20 end 'FORM "Rotate" "Use|Cancel"', 'INTEGER,"Rotate value",1,360,'rot',SLIDER' values=result parse var values ok rot . if ok = 0 then exit call open("temp","ie:prefs/verotate.cfg","W") res=writeln("temp",values) call close("temp") end MARK pic PRIMARY PROJECT_INFO pic ZOOM origzoomval=result ROTATE pic rot BEST rotpic=result BRIGHTNESS pic 255 bright=result ROTATE bright rot BEST brightrot=result CLOSE bright NEGATIVE brightrot negrot=result CLOSE brightrot MARK negrot PRIMARY MARK rotpic SECONDARY COMPOSITE 0 0 ADD final=result CLOSE negrot CLOSE rotpic exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end